
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<link href="<c:url value='/css/style.css'/>" rel="stylesheet" type="text/css"/>
<fmt:setBundle basename="messages" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Personal Leave Update</title>
</head>
<body>
	<%-- 	<form action="PersonalLeaveUpdateServlet.java" method="post"> 
		 <table border = "1" class="borderAll">
            <tr>            	
            	<th>LeaveId</th>
                <th>EmployeeID</th>
                <th>First Name</th>                
                <th>SurName</th>
                <th>LeaveType ID </th>
                <th>StartDate</th>
                <th>End Date</th>
                <th>Leave Period</th>
                <th>Reason</th>
                <th>WorkDissmenition</th>
                <th>ContactDetail</th>
                <th>Status</th>
                <th>Created By</th> 
                 <th>Created Date</th>
                 <th>Modified By</th>
              	 <th>Modified Date</th>
              	 <th><a href="${url}">Update</a></th>
            </tr>       --%>
            <c:url var="url" scope="page" value="/111.jsp">        		
                <c:param name="surname" value=""/>   
                <c:param name="leavetype" value=""/> 
                <c:param name="startdate" value=""/> 
                <c:param name="enddate" value=""/>                               
        </c:url>
		   <a href="${url}">Edit Leave</a>
        <br/><br/>
        <table class="borderAll">
            <tr>
          		<th>LeaveID</th>
            	<th>SurName</th>
                <th>LeaveType</th>             
                <th>Start Date</th>
                <th>End Date</th>
                <th>Leave Edit</th>
                <th>Leave delete</th>
            </tr>
                <c:forEach var="leave" items="${leave}" varStatus="idx">
                <tr>
                    <td class="nowrap">${idx.index+1 }</td> 
                    <td class="nowrap">${leave.surName}</td>
                    <td class="nowrap">${leave.leaveTypeID}</td>
                    <td class="nowrap">${leave.startDate}</td>
                    <td class="nowrap">${leave.endDate}</td>
                    <td class="nowrap">
                 
                    <c:url var="updurl" scope="page" value="/111.jsp">                            
                            <c:param name="surname" value="${leave.surName}"/>
			                <c:param name="leavetype" value="${leave.leavetype}"/> 
			                <c:param name="startdate" value="${leave.startdate}"/> 
			                <c:param name="enddate" value="${leave.enddate}"/> 
			                 <c:param name="update" value="true"/>
                        </c:url>
                        <a href="${updurl}">Leave Edit</a>
                        &nbsp;&nbsp;&nbsp;
                        <c:url var="delurl" scope="page" value="/PersonalLeaveUpdate.jsp">
                        	<c:param name="leaveid" value="${idx.index}"/> 
                                                    
                        </c:url>
                        <a href="${delurl}">Leave delete</a>
                    </td>
                     </tr>
                       </c:forEach>
                       </table>
                    
</body>
</html>